<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js"></script>
    <div id="box">
        <button v-on:click="fn($event)">打印事件对象</button>
        <a href="https://cn.bing.com/" v-on:click.prevent="fun()">baidu</a>
        <button v-on:click.once="f()">打</button>
    </div>
    <script>
        new Vue({
            el: "#box",
            data: {

            },
            methods: {
                fn($event) {
                    console.log($event);
                },
                fun() {
                    console.log(111);
                },
                f(){
                    console.log(2);
                }
            }
        })
    </script>
</body>

</html>